Skip to content

Add CI workflow to check for unapproved Go dependency licenses #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 6, 2022
Merged

Add CI workflow to check for unapproved Go dependency licenses #135

merged 3 commits into from
Sep 6, 2022

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Sep 6, 2022

Please check if the PR fulfills these requirements

What kind of change does this PR introduce?

Infrastructure enhancement

What is the current behavior?

Contributors and maintainers are not provided with any tools to assist them in the complex and esoteric subject of open source licence compliance.

What is the new behavior?

A task and GitHub Actions workflow are provided here for checking the license types of Go project dependencies.

On every push and pull request that affects relevant files, the CI workflow will use Licensed to check:

  • If the dependency licenses cache is up to date
  • If any of the project's dependencies have an unapproved license type.

Approval can be based on:

Other information

The workflow run is currently failing. This is an accurate result which is caused by incompatibility of the Apache 2.0 license of the Arduino Language Server with the license of dependencies used by the project, which underscores the need for the system added here.

Resolution of that non-compliance is out of scope for this PR.

A task and GitHub Actions workflow are provided here for checking the license types of Go project dependencies.

On every push and pull request that affects relevant files, the CI workflow will check:

- If the dependency licenses cache is up to date
- If any of the project's dependencies have an unapproved license type.

Approval can be based on:

- Universally allowed license type
- Individual dependency
The `.licenses` folder contains a cache of license metadata for all the project's Go dependencies. This serves two
purposes:

- Allow the Licensed dependency license checker tool to only check licenses when a dependency is added or updated
- Allow the maintainer to manually define license metadata when the licensee tool is unable to automatically detect it
The "Licensed" dependency license checker tool uses the licensee tool to automatically determine the license type based
on metadata provided by the dependency author. This must be in a standardized format without any modifications. In cases
where that wasn't done, it is necessary to determine the license type and update the dependency license metadata cache
in the `.licenses` folder manually.

The Licensed tool will check this data whenever the dependency version is updated to make sure the license hasn't
changed.
@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Sep 6, 2022
@per1234 per1234 self-assigned this Sep 6, 2022
Copy link
Contributor

@MatteoPologruto MatteoPologruto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work Per! Thanks for specifying that a failing workflow run is actually the expected result.

@per1234 per1234 merged commit 3150919 into arduino:main Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants